| Disk ARchive 2.8.1 Full featured and portable backup and archiving tool

Loading...
Searching...
No Matches
defile.hpp
Go to the documentation of this file.
1/*********************************************************************/
2// dar - disk archive - a backup/restoration program
3// Copyright (C) 2002-2025 Denis Corbin
4//
5// This program is free software; you can redistribute it and/or
6// modify it under the terms of the GNU General Public License
7// as published by the Free Software Foundation; either version 2
8// of the License, or (at your option) any later version.
9//
10// This program is distributed in the hope that it will be useful,
11// but WITHOUT ANY WARRANTY; without even the implied warranty of
12// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13// GNU General Public License for more details.
14//
15// You should have received a copy of the GNU General Public License
16// along with this program; if not, write to the Free Software
17// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18//
19// to contact the author, see the AUTHOR file
20/*********************************************************************/
21
25
26#ifndef DEFILE_HPP
27#define DEFILE_HPP
28
29#include "../my_config.h"
30#include "path.hpp"
31#include "cat_entree.hpp"
32
33 namespace libdar
34{
35
38
40
46 class defile
47 {
48 public :
49 defile(const path &racine) : chemin(racine) { init = true; cache_set = none; };
50 defile(const defile & ref) = default;
51 defile(defile && ref) noexcept = default;
52 defile & operator = (const defile & ref) = default;
53 defile & operator = (defile && ref) noexcept = default;
54 ~defile() = default;
55
56 void enfile(const cat_entree *e);
57 const path & get_path() const { return chemin; };
58 const std::string & get_string() const;
59 const std::string & get_string_without_root() const;
60
61 private :
62 path chemin;
63 bool init;
64 mutable enum { none, full, without_root } cache_set;
65 mutable std::string cache;
66 };
67
69
70} // end of namespace
71
72#endif
cat_entree.hpp
base class for all object contained in a catalogue
libdar::cat_entree
the root class from all other inherite for any entry in the catalogue
Definition cat_entree.hpp:60
libdar::defile
the defile class keep trace of the real path of files while the flow in the filter routines
Definition defile.hpp:47
libdar::defile::init
bool init
true if reached the "root" (all pushed arguments have been poped)
Definition defile.hpp:63
libdar::defile::cache_set
enum libdar::defile::@1 cache_set
whether cache is accurate
libdar::defile::cache
std::string cache
cache of "chemin" converted into string
Definition defile.hpp:65
libdar::defile::chemin
path chemin
current path
Definition defile.hpp:62
libdar::path
the class path is here to manipulate paths in the Unix notation: using'/'
Definition path.hpp:51
my_config.h
include macro defined by the configure script and some specific additional ones
libdar
libdar namespace encapsulate all libdar symbols
Definition archive.hpp:47
path.hpp
here is the definition of the path class